<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>Ansible-Semaphore | 惰 立</title><meta name="author" content="惰 立"><meta name="copyright" content="惰 立"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="一个 ansible web 界面，通过直观的操作和可视化界面工具，使得运行ansible playbook变的简单而有效">
<meta property="og:type" content="article">
<meta property="og:title" content="Ansible-Semaphore">
<meta property="og:url" content="https://duolili.duolili.top/2023/11/23/Ansible-Semaphore/index.html">
<meta property="og:site_name" content="惰 立">
<meta property="og:description" content="一个 ansible web 界面，通过直观的操作和可视化界面工具，使得运行ansible playbook变的简单而有效">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/51.png">
<meta property="article:published_time" content="2023-11-23T13:41:08.000Z">
<meta property="article:modified_time" content="2023-11-23T13:46:19.732Z">
<meta property="article:author" content="惰 立">
<meta property="article:tag" content="ansible">
<meta property="article:tag" content="Linux">
<meta property="article:tag" content="运维">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/51.png"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://duolili.duolili.top/2023/11/23/Ansible-Semaphore/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//fonts.googleapis.com" crossorigin=""/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium+Web&amp;display=swap" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: {"limitCount":50,"languages":{"author":"作者: 惰 立","link":"链接: ","source":"来源: 惰 立","info":"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},
  lightbox: 'fancybox',
  Snackbar: undefined,
  infinitegrid: {
    js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid/dist/infinitegrid.min.js',
    buttonText: '加载更多'
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: true,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Ansible-Semaphore',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2023-11-23 21:46:19'
}</script><script>(win=>{
      win.saveToLocal = {
        set: (key, value, ttl) => {
          if (ttl === 0) return
          const now = Date.now()
          const expiry = now + ttl * 86400000
          const item = {
            value,
            expiry
          }
          localStorage.setItem(key, JSON.stringify(item))
        },
      
        get: key => {
          const itemStr = localStorage.getItem(key)
      
          if (!itemStr) {
            return undefined
          }
          const item = JSON.parse(itemStr)
          const now = Date.now()
      
          if (now > item.expiry) {
            localStorage.removeItem(key)
            return undefined
          }
          return item.value
        }
      }
    
      win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
        const script = document.createElement('script')
        script.src = url
        script.async = true
        script.onerror = reject
        script.onload = script.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          script.onload = script.onreadystatechange = null
          resolve()
        }

        Object.keys(attr).forEach(key => {
          script.setAttribute(key, attr[key])
        })

        document.head.appendChild(script)
      })
    
      win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
        const link = document.createElement('link')
        link.rel = 'stylesheet'
        link.href = url
        if (id) link.id = id
        link.onerror = reject
        link.onload = link.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          link.onload = link.onreadystatechange = null
          resolve()
        }
        document.head.appendChild(link)
      })
    
      win.activateDarkMode = () => {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = () => {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
        if (t === 'dark') activateDarkMode()
        else if (t === 'light') activateLightMode()
      
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
      const detectApple = () => {
        if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
          document.documentElement.classList.add('apple')
        }
      }
      detectApple()
    })(window)</script><meta name="generator" content="Hexo 7.0.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/img/tou.jpeg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">6</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">7</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">2</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 媒体</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 链接</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg fixed" id="page-header" style="background-image: url('https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/51.png')"><nav id="nav"><span id="blog-info"><a href="/" title="惰 立"><span class="site-name">惰 立</span></a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 媒体</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 链接</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">Ansible-Semaphore</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-11-23T13:41:08.000Z" title="发表于 2023-11-23 21:41:08">2023-11-23</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-11-23T13:46:19.732Z" title="更新于 2023-11-23 21:46:19">2023-11-23</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E8%BF%90%E7%BB%B4/">运维</a><i class="fas fa-angle-right post-meta-separator"></i><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E8%BF%90%E7%BB%B4/Linux/">Linux</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">1.4k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>7分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="Ansible-Semaphore"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><p>一个 ansible web 界面，通过直观的操作和可视化界面工具，使得运行ansible playbook变的简单而有效<br>默认端口 3000</p>
<p>参考</p>
<ul>
<li>Github：<a target="_blank" rel="noopener" href="https://github.com/ansible-semaphore/semaphore">点击跳转</a></li>
<li>官方文档：<a target="_blank" rel="noopener" href="https://docs.ansible-semaphore.com/administration-guide/installation">点击跳转</a></li>
</ul>
<h1 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h1><p>按照安装方式的不同，可分为4种：snap（snap命令行安装）、package manage（包管理器安装）r、docker（容器化安装）、binary file（二进制安装）</p>
<h2 id="Snap"><a href="#Snap" class="headerlink" title="Snap"></a>Snap</h2><p>环境准备<br>Centos7.6 1810	192.168.1.20</p>
<p>安装snap命令</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">[root@test ~]# yum install epel-release -y</span><br><span class="line">[root@test ~]# yum install snapd -y</span><br><span class="line">[root@test ~]# systemctl start snapd.socket		# snapd的socket用于与命令snap通信</span><br><span class="line">[root@test ~]# systemctl start snapd.service</span><br><span class="line">[root@test ~]# ln -sf /var/lib/snapd/snap /snap</span><br><span class="line">[root@test ~]# snap version</span><br></pre></td></tr></table></figure>

<p>安装semaphorfe</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">[root@test ~]# snap install semaphore</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">此时可通过3000端口打开ui页面，但无法进行登录，因此，需要设置登录用户</span></span><br></pre></td></tr></table></figure>

<p><img src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/markdown/Ansible-Semaphore/1.png" alt="image.png"><br>设置管理员登陆用户</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@test ~]# snap stop semaphore</span><br><span class="line">[root@test ~]# /snap/bin/semaphore user add --admin --login duoli --name=duoli --email=duoli@163.com --password=12345</span><br><span class="line">[root@test ~]# snap start semaphore</span><br></pre></td></tr></table></figure>

<p>此时可以通过duoli&#x2F;12345进行登录<br><img src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/markdown/Ansible-Semaphore/2.png" alt="image.png"><br><img src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/markdown/Ansible-Semaphore/3.png" alt="image.png"></p>
<p>snap命令扩展</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">查看semaphore服务状态</span></span><br><span class="line">[root@test ~]# snap services semaphore</span><br><span class="line">Service               Startup  Current  Notes</span><br><span class="line">semaphore.semaphored  enabled  active   -</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">查看服务配置信息</span></span><br><span class="line">[root@test ~]# snap get semaphore</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置服务配置【可配置信息参考：https://docs.ansible-semaphore.com/administration-guide/configuration】</span></span><br><span class="line">[root@test ~]# snap set semaphore port=4444</span><br><span class="line">[root@test ~]# snap restart semaphore</span><br></pre></td></tr></table></figure>

<h2 id="Package-Manage"><a href="#Package-Manage" class="headerlink" title="Package Manage"></a>Package Manage</h2><h2 id="Docker"><a href="#Docker" class="headerlink" title="Docker"></a>Docker</h2><h2 id="Binary-File"><a href="#Binary-File" class="headerlink" title="Binary File"></a>Binary File</h2><p>创建用户</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[root@test ~]# useradd semaphore</span><br></pre></td></tr></table></figure>

<p>安装ansible</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@test ~]# yum install epel-release -y</span><br><span class="line">[root@test ~]# yum install ansible -y</span><br><span class="line">[root@test ~]# ansible --version</span><br></pre></td></tr></table></figure>

<p>安装python3</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">安装编译工具</span></span><br><span class="line">[root@test ~]# yum -y groupinstall &quot;Development tools&quot; </span><br><span class="line">[root@test ~]# yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel</span><br><span class="line">[root@test ~]# yum install -y libffi-devel zlib1g-dev</span><br><span class="line">[root@test ~]# yum install zlib* -y</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">下载安装包并解压</span></span><br><span class="line">[root@test ~]# wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz</span><br><span class="line">[root@test ~]# tar -xvJf  Python-3.7.2.tar.xz</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">编译安装</span></span><br><span class="line">[root@test ~]# cd Python-3.7.2</span><br><span class="line">[root@test Python-3.7.2]# mkdir -p /usr/local/python3</span><br><span class="line">[root@test Python-3.7.2]# ./configure --prefix=/usr/local/python3 --enable-optimizations --with-ssl</span><br><span class="line"><span class="meta prompt_">	#</span><span class="language-bash">第一个指定安装的路径,不指定的话,安装过程中可能软件所需要的文件复制到其他不同目录,删除软件很不方便,复制软件也不方便.</span></span><br><span class="line"><span class="meta prompt_">	#</span><span class="language-bash">第二个可以提高python10%-20%代码运行速度.</span></span><br><span class="line"><span class="meta prompt_">	#</span><span class="language-bash">第三个是为了安装pip需要用到ssl</span></span><br><span class="line">[root@test Python-3.7.2]# make &amp;&amp; make install</span><br><span class="line">[root@test Python-3.7.2]# ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3</span><br><span class="line">[root@test Python-3.7.2]# ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3</span><br><span class="line">[root@test Python-3.7.2]# python3 -V</span><br><span class="line">[root@test Python-3.7.2]# pip3 -V</span><br></pre></td></tr></table></figure>

<p>创建配置文件</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line">[root@test ~]# su - semaphore</span><br><span class="line">[semaphore@test ~]$ vim requirements.txt</span><br><span class="line">ansible</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash"><span class="keyword">for</span> common jinja-filters</span></span><br><span class="line">netaddr</span><br><span class="line">jmespath</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash"><span class="keyword">for</span> common modules</span></span><br><span class="line">pywinrm</span><br><span class="line">passlib</span><br><span class="line">requests</span><br><span class="line">docker</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">[semaphore@test ~]$ vim requirements.yml</span><br><span class="line">---</span><br><span class="line">collections:</span><br><span class="line">  - &#x27;namespace.collection&#x27;</span><br><span class="line"><span class="meta prompt_">  # </span><span class="language-bash"><span class="keyword">for</span> common collections:</span></span><br><span class="line">  - &#x27;community.general&#x27;</span><br><span class="line">  - &#x27;ansible.posix&#x27;</span><br><span class="line">  - &#x27;community.mysql&#x27;</span><br><span class="line">  - &#x27;community.crypto&#x27;</span><br><span class="line"></span><br><span class="line">roles:</span><br><span class="line">  - src: &#x27;namespace.role&#x27;</span><br></pre></td></tr></table></figure>

<p>安装mysql</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br></pre></td><td class="code"><pre><span class="line">[root@test ~]# vim mysql.sh</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">!/bin/bash</span></span><br><span class="line"></span><br><span class="line">yum remove `rpm -qa| grep mariadb` -y</span><br><span class="line">yum install wget -y</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">wget http://aliyun-ops.oss-cn-beijing.aliyuncs.com/software/mysql-5.7.32-linux-glibc2.12-x86_64.tar.gz</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">tar -xf mysql-5.7.32-linux-glibc2.12-x86_64.tar.gz -C /usr/local/</span></span><br><span class="line">tar -xf mysql-5.7.38-el7-x86_64.tar.gz -C /usr/local/</span><br><span class="line">cd /usr/local/ &amp;&amp; ln -sv mysql-5.7.38-el7-x86_64 mysql</span><br><span class="line">useradd -s /sbin/nologin mysql</span><br><span class="line">chown -R mysql.mysql mysql &amp;&amp; chown -R mysql.mysql mysql-5.7.38-el7-x86_64</span><br><span class="line">echo -e &#x27;export MYSQL_HOME=/usr/local/mysql\nexport PATH=$PATH:$MYSQL_HOME/bin&#x27; &gt;&gt;  /etc/profile.d/mysql.sh</span><br><span class="line">mkdir -p /data/mysql/data</span><br><span class="line">chown -R mysql.mysql /data/mysql/data</span><br><span class="line">/usr/local/mysql/bin/mysqld --initialize-insecure --user=mysql --basedir=/usr/loca/mysql --datadir=/data/mysql/data</span><br><span class="line">cat &gt;/etc/my.cnf &lt;&lt;EOF</span><br><span class="line">[mysqld]</span><br><span class="line">skip_ssl</span><br><span class="line">bind-address=0.0.0.0</span><br><span class="line">port=3306</span><br><span class="line">user=mysql</span><br><span class="line">basedir=/usr/local/mysql</span><br><span class="line">datadir=/data/mysql/data</span><br><span class="line">socket=/tmp/mysql.sock</span><br><span class="line">symbolic-links=0</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">!includedir /etc/my.cnf.d</span></span><br><span class="line">init_connect=&#x27;SET NAMES utf8&#x27;</span><br><span class="line">skip-character-set-client-handshake</span><br><span class="line">max_allowed_packet = 34M</span><br><span class="line">innodb_log_file_size = 256M</span><br><span class="line">transaction-isolation=READ-COMMITTED</span><br><span class="line">default-storage-engine=INNODB</span><br><span class="line">character_set_server=utf8mb4</span><br><span class="line">innodb_default_row_format=DYNAMIC</span><br><span class="line">innodb_large_prefix=ON</span><br><span class="line">innodb_file_format=Barracuda</span><br><span class="line">innodb_log_file_size=2G</span><br><span class="line">EOF</span><br><span class="line"></span><br><span class="line">chown -R mysql.mysql /etc/my.cnf</span><br><span class="line"></span><br><span class="line">cat &gt;/etc/systemd/system/mysqld.service &lt;&lt;EOF</span><br><span class="line">[Unit]</span><br><span class="line">Description=MySQL Server</span><br><span class="line">Documentation=man:mysqld(8)</span><br><span class="line">Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html</span><br><span class="line">After=network.target</span><br><span class="line">After=syslog.target</span><br><span class="line">[Install]</span><br><span class="line">WantedBy=multi-user.target</span><br><span class="line">[Service]</span><br><span class="line">User=mysql</span><br><span class="line">Group=mysql</span><br><span class="line">ExecStart=/usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf</span><br><span class="line">LimitNOFILE=5000</span><br><span class="line">EOF</span><br><span class="line"></span><br><span class="line">systemctl start mysqld &amp;&amp; systemctl enable mysqld</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">/usr/local/mysql/bin/mysqladmin -hlocalhost -uroot password CloudEasy@2020</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">/usr/local/mysql/bin/mysql -uroot -pCloudEasy@2020 -NBe <span class="string">&quot;update mysql.user set host = &#x27;%&#x27; where user = &#x27;root&#x27;;&quot;</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">/usr/local/mysql/bin/mysql -uroot -pCloudEasy@2020 -NBe <span class="string">&quot;flush privileges;&quot;</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">reboot</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">cat &gt; /tmp/init.sh &lt;&lt;EOF</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">!/bin/bash</span></span><br><span class="line">mysqladmin -hlocalhost -uroot password CloudEasy@2020</span><br><span class="line">mysql -uroot -pCloudEasy@2020 -NBe &quot;update mysql.user set host = &#x27;%&#x27; where user = &#x27;root&#x27;;&quot;</span><br><span class="line">mysql -uroot -pCloudEasy@2020 -NBe &quot;flush privileges;&quot;</span><br><span class="line">echo -e &quot;\033[31mROOT密码：\033[33mCloudEasy@2020\033[0m&quot;</span><br><span class="line">EOF</span><br><span class="line"></span><br><span class="line">echo -e &quot;\033[31m请按顺序执行：\n\033[31m第一步：\033[32msource /etc/profile.d/mysql.sh\n\033[31m第二步：\033[32msh /tmp/init.sh\n\033[31m提醒：\033[31m若执行报错，从第一步重新执行\033[0m&quot;</span><br><span class="line"></span><br><span class="line">[root@test ~]# sh mysql.sh</span><br><span class="line">[root@test ~]# source /etc/profile.d/mysql.sh</span><br><span class="line">[root@test ~]# sh /tmp/init.sh</span><br><span class="line">[root@test ~]# mysql -uroot -pCloudEasy@2020 -NBe &quot;create database semaphore;&quot;</span><br></pre></td></tr></table></figure>

<p>安装semaphore</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre></td><td class="code"><pre><span class="line">[root@test ~]# su - semaphore</span><br><span class="line">[semaphore@test ~]$ wget https://github.com/ansible-semaphore/semaphore/releases/download/v2.8.75/semaphore_2.8.75_linux_amd64.tar.gz</span><br><span class="line">[semaphore@test ~]$ tar xf semaphore_2.8.75_linux_amd64.tar.gz</span><br><span class="line">[semaphore@test ~]$ ./semaphore setup		# 设置配置，会生成config.json文件</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment">##验证运行：【nohup ./semaphore server --config /home/semaphore/config.json &amp;】</span></span></span><br><span class="line">[semaphore@test ~]$ exit</span><br><span class="line">[root@test ~]# ln -sv /home/semaphore/semaphore /usr/bin/semaphore</span><br><span class="line">[root@test ~]#  cat &gt; /etc/systemd/system/semaphore.service &lt;&lt;EOF</span><br><span class="line">[Unit]</span><br><span class="line">Description=Ansible Semaphore</span><br><span class="line">Documentation=https://docs.ansible-semaphore.com/</span><br><span class="line">Wants=network-online.target</span><br><span class="line">After=network-online.target</span><br><span class="line">ConditionPathExists=/usr/bin/semaphore</span><br><span class="line">ConditionPathExists=/home/semaphore/config.json</span><br><span class="line"></span><br><span class="line">[Service]</span><br><span class="line">User=semaphore</span><br><span class="line">Group=semaphore</span><br><span class="line">Restart=always</span><br><span class="line">RestartSec=10s</span><br><span class="line">Environment=&quot;PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:~/.local/bin&quot;</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ExecStartPre=/bin/bash -c <span class="string">&#x27;ansible-galaxy collection install --upgrade -r /home/semaphore/requirements.yml&#x27;</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ExecStartPre=/bin/bash -c <span class="string">&#x27;ansible-galaxy role install --force -r /home/semaphore/requirements.yml&#x27;</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ExecStartPre=/bin/bash -c <span class="string">&#x27;python3 -m pip3 install --upgrade --user -r /home/semaphore/requirements.txt&#x27;</span></span></span><br><span class="line"></span><br><span class="line">ExecStart=/usr/bin/semaphore service --config /home/semaphore/config.json</span><br><span class="line">ExecReload=/bin/kill -HUP $MAINPID</span><br><span class="line"></span><br><span class="line">[Install]</span><br><span class="line">WantedBy=multi-user.target</span><br><span class="line">EOF</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment">## 实验时，配置上下文时启动始终有问题</span></span></span><br><span class="line">[root@test ~]# systemctl daemon-reload</span><br><span class="line">[root@test ~]# systemctl start semaphore</span><br><span class="line">[root@test ~]# systemctl enbale semaphore</span><br></pre></td></tr></table></figure>


<h1 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h1><p>首次登录需要配置项目名称以及并行任务数量（0表示不限制）<br><img src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/markdown/Ansible-Semaphore/4.png" alt="image.png"><br><img src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/markdown/Ansible-Semaphore/5.png" alt="image.png"></p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta"><i class="fas fa-circle-user fa-fw"></i>文章作者: </span><span class="post-copyright-info"><a href="https://duolili.duolili.top">惰 立</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta"><i class="fas fa-square-arrow-up-right fa-fw"></i>文章链接: </span><span class="post-copyright-info"><a href="https://duolili.duolili.top/2023/11/23/Ansible-Semaphore/">https://duolili.duolili.top/2023/11/23/Ansible-Semaphore/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta"><i class="fas fa-circle-exclamation fa-fw"></i>版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://duolili.duolili.top" target="_blank">惰 立</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/ansible/">ansible</a><a class="post-meta__tags" href="/tags/Linux/">Linux</a><a class="post-meta__tags" href="/tags/%E8%BF%90%E7%BB%B4/">运维</a></div><div class="post_share"><div class="social-share" data-image="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/51.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button"><i class="fas fa-qrcode"></i>赞助</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/img/wechat.jpg" target="_blank"><img class="post-qr-code-img" src="/img/wechat.jpg" alt="wechat"/></a><div class="post-qr-code-desc">wechat</div></li><li class="reward-item"><a href="/img/alipay.jpg" target="_blank"><img class="post-qr-code-img" src="/img/alipay.jpg" alt="alipay"/></a><div class="post-qr-code-desc">alipay</div></li></ul></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2023/11/23/SubVersion/" title="SubVersion"><img class="cover" src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg3.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">SubVersion</div></div></a></div><div class="next-post pull-right"><a href="/2023/11/23/JDK%E5%AE%89%E8%A3%85/" title="JDK安装"><img class="cover" src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/42.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">JDK安装</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/2023/11/23/JDK%E5%AE%89%E8%A3%85/" title="JDK安装"><img class="cover" src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/42.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-11-23</div><div class="title">JDK安装</div></div></a></div><div><a href="/2023/11/23/SubVersion/" title="SubVersion"><img class="cover" src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg3.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-11-23</div><div class="title">SubVersion</div></div></a></div><div><a href="/2023/11/23/%E6%97%B6%E9%97%B4%E6%9C%8D%E5%8A%A1%E5%99%A8/" title="时间服务器"><img class="cover" src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/19.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-11-23</div><div class="title">时间服务器</div></div></a></div><div><a href="/2023/11/23/iptables/" title="iptables"><img class="cover" src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/4.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-11-23</div><div class="title">iptables</div></div></a></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/img/tou.jpeg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">惰 立</div><div class="author-info__description">惰尽这，焉有不立乎</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">6</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">7</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">2</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%AE%89%E8%A3%85"><span class="toc-number">1.</span> <span class="toc-text">安装</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#Snap"><span class="toc-number">1.1.</span> <span class="toc-text">Snap</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Package-Manage"><span class="toc-number">1.2.</span> <span class="toc-text">Package Manage</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Docker"><span class="toc-number">1.3.</span> <span class="toc-text">Docker</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Binary-File"><span class="toc-number">1.4.</span> <span class="toc-text">Binary File</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8"><span class="toc-number">2.</span> <span class="toc-text">使用</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2023/11/23/SubVersion/" title="SubVersion"><img src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg3.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="SubVersion"/></a><div class="content"><a class="title" href="/2023/11/23/SubVersion/" title="SubVersion">SubVersion</a><time datetime="2023-11-23T13:48:13.000Z" title="发表于 2023-11-23 21:48:13">2023-11-23</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/11/23/Ansible-Semaphore/" title="Ansible-Semaphore"><img src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/51.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Ansible-Semaphore"/></a><div class="content"><a class="title" href="/2023/11/23/Ansible-Semaphore/" title="Ansible-Semaphore">Ansible-Semaphore</a><time datetime="2023-11-23T13:41:08.000Z" title="发表于 2023-11-23 21:41:08">2023-11-23</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/11/23/JDK%E5%AE%89%E8%A3%85/" title="JDK安装"><img src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/42.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="JDK安装"/></a><div class="content"><a class="title" href="/2023/11/23/JDK%E5%AE%89%E8%A3%85/" title="JDK安装">JDK安装</a><time datetime="2023-11-23T13:32:08.000Z" title="发表于 2023-11-23 21:32:08">2023-11-23</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/11/23/%E6%97%B6%E9%97%B4%E6%9C%8D%E5%8A%A1%E5%99%A8/" title="时间服务器"><img src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/19.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="时间服务器"/></a><div class="content"><a class="title" href="/2023/11/23/%E6%97%B6%E9%97%B4%E6%9C%8D%E5%8A%A1%E5%99%A8/" title="时间服务器">时间服务器</a><time datetime="2023-11-23T11:07:46.000Z" title="发表于 2023-11-23 19:07:46">2023-11-23</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/11/23/iptables/" title="iptables"><img src="https://cdn.jsdelivr.net/gh/duoli-hub/cdn/source/img/cover/4.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="iptables"/></a><div class="content"><a class="title" href="/2023/11/23/iptables/" title="iptables">iptables</a><time datetime="2023-11-23T08:44:45.000Z" title="发表于 2023-11-23 16:44:45">2023-11-23</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2023 By 惰 立</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">Hi, welcome to my <a target="_blank" rel="noopener" href="https://duolili.duolili.topg/">blog</a>!</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://cdn.jsdelivr.net/npm/pangu/dist/browser/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><div class="js-pjax"></div><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-fluttering-ribbon.min.js"></script><script id="canvas_nest" defer="defer" color="0,0,255" opacity="0.7" zIndex="-1" count="99" mobile="true" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-nest.min.js"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>